#include <windows.h>
#include "CPositionPacket.h"

CPositionPacket::CPositionPacket(CBaseEntity * pEntity,struct position pos) {
	unsigned int id			= pEntity->getId();
	unsigned short targid	= pEntity->getTargId();
	memset(this->data, 0, 28);
	this->type = 0x5B;
	this->size = 0x0E;
	memcpy(this->data, &pos.x, sizeof(pos.x));
	memcpy(this->data+4, &pos.y, sizeof(pos.y));
	memcpy(this->data+8, &pos.z, sizeof(pos.z));
	
	memcpy(this->data+12, &(id), sizeof(unsigned int));
	memcpy(this->data+16, &(targid), sizeof(unsigned short));
	memcpy(this->data+19, &(pos.rotation),sizeof(pos.rotation));
}

CPositionPacket::~CPositionPacket() {

}
